package com.itheima;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;

@SpringBootApplication
@MapperScan("com.itheima.mapper")
public class MPApplication extends SpringBootServletInitializer {
    public static void main(String[] args) {

        SpringApplication.run(MPApplication.class);
    }
    //打war包，运行springboot项目操作，将springboot项目运行入口由main方法，转为外置tomcat
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(MPApplication.class);
    }
}
